package MyOop01;

public class Student {
    public String name;
    public int age;
    public String class1;
    public String hobby;


    public void show(){
        System.out.println("姓名："+name);
        System.out.println("年龄："+age);
        System.out.println("就读于："+class1);
        System.out.println("爱好："+hobby);
    }

    public static void main(String[] args) {
        Student student = new Student();
        student.name = "张浩";
        student.age = 10;
        student.class1 = "s1";
        student.hobby = "篮球";

        student.show();

    }
}
